package com.example.springjpa.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("guest")
public class GuestController {


    @GetMapping("enter")
    public ModelAndView login() {
        ModelAndView modelAndView = new ModelAndView("index");
        modelAndView.addObject("message","欢迎进入，您的身份是游客");
        return modelAndView;
    }

    @GetMapping("getMessage")
    public ModelAndView submitLogin() {
        ModelAndView modelAndView = new ModelAndView("index");
        modelAndView.addObject("message","您拥有获得该接口的信息的权限");
        return modelAndView;
    }

}
